package com.example.server.repository;

import org.apache.catalina.LifecycleState;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.List;
import java.util.Map;


public interface GenericRepository <T extends Serializable,ID extends Number>{

    int create(T t);

    int removeById(ID id);

    int modify(T t);

    int modifyOne(String sqlId,Object parameter);

    T queryById(ID id);

    List<T> queryAll();

    T queryOne(String sqlId,Object parameter);

    List<T> queryList(String sqlId,Object parameter);

    int queryNum(String sqlId,Object parameter);

    double queryAmount(String sqlId,Object parameter);
    int removeByIds(int[] t);
    int removeOne(String sqlId,Object parameters);
    Double sumByMap(Map map);
}
